package AAA;

import AAA.Stack;
import queue.MyCircularQueue;
import queue.MyQueue;
import java.util.LinkedList;
//import java.util.Stack;

public class Mian {
    public static void main6(String[] args) {

    }
    public static void main5(String[] args) {
        MyCircularQueue queue = new MyCircularQueue(5);
        queue.enQueue(1);
        queue.enQueue(2);
        queue.enQueue(3);
        queue.enQueue(4);
        queue.enQueue(5);
        System.out.println((queue.Rear()));

      queue.display();
    }
    public static void main4(String[] args) {
     MyQueue myQueue = new MyQueue();
        myQueue.offer(1);
        myQueue.offer(2);
        myQueue.offer(3);
        myQueue.offer(4);

        System.out.println(myQueue.pull());
        System.out.println(myQueue.peek());
    }
    public static void main3(String[] args) {
        String[] tokens = {"2", "1", "+", "3", "*"};
        String s = "()[]{}";
        Stack<Character> stack1 = new Stack();
       // stack1.isValid(s);
        int[] pushV = {1,2,3,4,5};
        int[] popV = {4,5,3,2,1};
        System.out.println(stack1.IsPopOrder(pushV, popV));
    }
    public static void main2(String[] args) {
        LinkedList<Integer> stack = new LinkedList<>();
        stack.push(1);
        stack.push(2);
        stack.push(3);
        System.out.println(stack.pop());
        System.out.println(stack.peek());
    }
    /*public static void main1(String[] args) {
        ListStack stack = new ListStack();
        stack.push(1);
        stack.push(2);
        stack.push(3);
        stack.push(4);
        stack.display();
        System.out.println("------------");
       int ret = stack.pop();
      stack.display();
        System.out.println();
        int ret2= stack.peek();
        System.out.println(ret);
    }*/
}
